import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Date: 2024-01-22
 * Time:13:56
 */


public class Main {

    public static void main2(String[] args) {
        Student[] students = {new Student("张三",98),
                new Student("李四",99),
                new Student("王五",85),
                new Student("Sugar",88)};
        insertSort.InsertSort(students);
        System.out.println(Arrays.toString(students));
    }

    public static void main1(String[] args) {
    //    Student[] array = {new Student("张三",98),
//    new Student("李四",99),
//    new Student("王五",85),
//    new Student("Sugar",88)};

    GradeComparator gradeComparator = new GradeComparator();
    NameComparator nameComparator = new NameComparator();
    //    Student student1 = new Student("张三", 80);
//    Student student2 = new Student("李四", 90);
//    Student student3 = new Student("王五", 95);

    //Arrays.sort(array,gradeComparator);
//        Arrays.sort(array,nameComparator);
//        System.out.println(Arrays.toString(array));
}

    public static void main3(String[] args) throws CloneNotSupportedException{
        Student student1 = new Student("张三",98);
        Student student2 = (Student) student1.clone();
        System.out.println(student2);
    }

    public static void main(String[] args) throws CloneNotSupportedException{
        Student student1 = new Student("张三",98);
        Student student2 = (Student) student1.clone();
        student1.setGrade(90);
        System.out.println(student1.getGrade());
        System.out.println(student2.getGrade());
    }
}
